package com.ruitu.mall_98_2.mvp.contract;

import com.beanu.arad.base.BaseModel;
import com.beanu.arad.base.BasePresenter;
import com.beanu.arad.base.BaseView;
import com.ruitu.router_module.bean.api.BaseResult;
import com.ruitu.router_module.bean.cart.CartBean;

import rx.Observable;

public interface CartContract {
    interface Model extends BaseModel{
        Observable<BaseResult<CartBean>> getCarts( String accountId);

        Observable<BaseResult> deleteByIds( String ids);

        Observable<BaseResult> updateCartNum( String id,int num);

        Observable<BaseResult<String>> calCarts( String ids);
    }

    interface View extends BaseView{
        void setData(CartBean cartBeans);

        void setFaiel();

        void setDeleteSuc();

       void updateCartNumSuc();

       void setString(String total);
    }

    abstract class Presenter extends BasePresenter<View,Model>{
        public abstract void getCarts(String accountId);

        public abstract void deleteByIds( String ids);

        public abstract void updateCartNum( String id,int num);

        public abstract void calCarts( String ids);


    }
}
